#include <iostream>
using namespace std;
class NameStrategy
{
public:
    virtual void greet() = 0;
};

class SayHi:public NameStrategy{
public:
    void greet(){
        cout << "hi!"<<endl;
    }
};

class Ignore:public NameStrategy{
    public:
        void greet(){
            cout << "Ignore!"<<endl;
        }
};

class Admission:public NameStrategy{
    public:
        void greet(){
            cout << "Admission!"<<endl;
        }
};
class Context{
    NameStrategy& strategy;
public:
   Context(NameStrategy& stra):strategy(stra){

   }
   void greet(){
     strategy.greet();
   }   
};
int main(){
    SayHi sh;
    Ignore ig;
    Admission ad;
    Context c1(sh),c2(ig),c3(ad);
    c1.greet();
    c2.greet();
    c3.greet();
    return 0;
}